<template>
  <div>
    <!-- 导航1 -->
    <el-header class="header">
      <el-row>
        <el-menu mode="horizontal" background-color="#545c64" text-color="#fff" class="header_navbar">
          <el-col :span="8">
            <!-- 导航条logo -->
            <el-menu-item index="1" class="logo_box">
              <img src="../assets/librarian/image/lib_logo.png" class="logo" />
            </el-menu-item>
          </el-col>
          <el-col :span="8">
            <!-- 导航条搜索框 -->
            <el-menu-item index="2">
              <el-input placeholder="Search here" clearable>
                <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
              </el-input>
            </el-menu-item>
          </el-col>
          <!-- 导航条退出按钮 -->
          <el-col :span="8">
            <el-row>
              <el-menu-item index="2">
                <el-button type="primary" @click="goToReader">Reader Login</el-button>
                <el-button type="success" @click="goToLib">Librarian Login</el-button>
                <el-button type="warning" @click="goToAdmin">Admin Login</el-button>
              </el-menu-item>
            </el-row>
          </el-col>
        </el-menu>
      </el-row>
    </el-header>
    <!-- 路由占位符 -->
    <router-view></router-view>
  </div>
</template>

<script>
  export default{
    data(){
      return{

      }
    },
    created(){

    },
    methods:{
      // 跳转reader登录页面
      goToReader(){
        this.$router.push('/reader_login')
      },
      // 跳转Librarian登录页面
      goToLib(){
        this.$router.push('/login')
      },
      // 跳转admin登录页面
      goToAdmin(){
        this.$router.push('/admin_login')
      },
      // 跳转搜索页面
      search(){
        this.$router.push('/search_result')
      },
    }
  }
</script>

<style>
</style>
